package portal.beans;

import java.sql.Date;

import portal.common.MesageCode;
/**
 * @Description //TODO 计算节点类
 * @Author HMY
 **/
public class Node {
    private Integer nodeId;
    private String nodeName;
    private String nodeIp;
    private Integer gpuId;
    private String groupName;
    private String cpuRatio;
    private String remain_mem;
    private String status;
    private Date createTime;    
    private String limitProcess;
    private Integer inactive;
    private Gpu gpu;


	public Gpu getGpu() {
		return gpu;
	}

	public void setGpu(Gpu gpu) {
		this.gpu = gpu;
	}

	public String getNodeName() {
        return nodeName;
    }

    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    public Integer getNodeId() {
        return nodeId;
    }

    public void setNodeId(int nodeId) {
        this.nodeId = nodeId;
    }

    public String getNodeIp() {
        return nodeIp;
    }

    public void setNodeIp(String nodeIp) {
        this.nodeIp = nodeIp;
    }

    public Integer getGpuId() {
        return gpuId;
    }

    public void setGpuId(Integer gpuId) {
        this.gpuId = gpuId;
    }  



    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getCpuRatio() {
        return cpuRatio;
    }

    public void setCpuRatio(String cupRatio) {
        this.cpuRatio = cupRatio;
    }

    public String getRemain_mem() {
        return remain_mem;
    }

    public void setRemain_mem(String remain_mem) {
        this.remain_mem = remain_mem;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getLimitProcess() {
		return limitProcess;
	}

	public void setLimitProcess(String limitProcess) {
		this.limitProcess = limitProcess;
	}
	/*****
	 * @return 返回值 1: 表示 host 为集群系统中非有效节点，-1 表示：该结点为集群系统中节点点 
	 * ****/
	public Integer getInactive() {
		return inactive>0?MesageCode.TRUE:MesageCode.FALSE;
	}
	/***
	 *@param inactive  >0 表示 设置该结点为无效节点，等同于同集群中移除该节点， 否则表示该结点为集群中的有效节点
	 ***/
	public void setInactive(Integer inactive) {
		if(inactive>0)
			this.inactive = MesageCode.TRUE;
		else
			this.inactive = MesageCode.FALSE;
	}

    
}
